Split initialize function and add post-initialize phase - #1467
Closed
KFilipek wants to merge 4 commits into
Closed
Conversation
bratpiorka
marked this pull request as draft
July 28, 2025 09:22
KFilipek
force-pushed
the
post_initialize
branch
17 times, most recently
from
August 1, 2025 08:46
54df467 to
40c6dfc
Compare
KFilipek
marked this pull request as ready for review
August 1, 2025 10:14
KFilipek
force-pushed
the
post_initialize
branch
from
August 1, 2025 10:52
40c6dfc to
1f76309
Compare
lplewa
requested changes
Aug 1, 2025
Comment on lines
+171
to
+176
| /// @param provider memory provider that will be used for coarse-grain allocations. | ||
| /// Should contain at least one memory provider. | ||
| /// @param numProvider number of elements in the providers array | ||
| /// @param params pool-specific params, or NULL for defaults | ||
| /// @param pool [out] returns pointer to the pool | ||
| /// @return UMF_RESULT_SUCCESS on success or appropriate error code on failure. |
lplewa
reviewed
Aug 1, 2025
| void *provider) { | ||
| (void)params; | ||
| (void)provider; | ||
| // For initial version, just return success |
Collaborator
There was a problem hiding this comment.
since this is ext function, can't we just omit it, when not needed?
Contributor
There was a problem hiding this comment.
+1 - this would be replaced by "default" handler during provider creation
KFilipek
force-pushed
the
post_initialize
branch
2 times, most recently
from
August 4, 2025 11:53
a5f6195 to
7aca774
Compare
bratpiorka
requested changes
Aug 4, 2025
| void *provider) { | ||
| (void)params; | ||
| (void)provider; | ||
| // For initial version, just return success |
Contributor
There was a problem hiding this comment.
+1 - this would be replaced by "default" handler during provider creation
bratpiorka
reviewed
Aug 5, 2025
KFilipek
force-pushed
the
post_initialize
branch
7 times, most recently
from
August 5, 2025 17:19
172429a to
1fcad79
Compare
vinser52
reviewed
Aug 5, 2025
| /// \details | ||
| /// * This function *must* be implemented if the pool/provider supports CTL that overrides defaults. | ||
| /// * This function *must* free any resources allocated in the function. | ||
| /// * This function *must* be called after the memory pool has been allocated in initialize function |
There was a problem hiding this comment.
This function *must* be called after the memory pool has been allocated in initialize function
Must be called by whom? If UMF calls it, then the comment is missleading.
Contributor
Author
There was a problem hiding this comment.
It's about the function order. Generally, this function is the same case as initialize(), it's also invoked in the same way - internally.
KFilipek
force-pushed
the
post_initialize
branch
10 times, most recently
from
August 7, 2025 14:32
eaab2b7 to
a3ac32a
Compare
Split between initialize and post-initialize function is necessary for properly handling CTL defaults.
KFilipek
force-pushed
the
post_initialize
branch
from
August 7, 2025 16:51
a3ac32a to
6fee430
Compare
KFilipek
requested review from
bratpiorka,
lplewa,
lukaszstolarczuk and
vinser52
August 7, 2025 20:09
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Checklist